<script lang="ts" setup>
import UniNaveBar from "@/components/uni-nav-bar/uni-nav-bar.vue";
import UniIcons from "@/components/uni-icons/uni-icons.vue";
</script>

<template>
  <view class="nav-bar">
    <UniNaveBar :status-bar="true" :fixed="false" :left-width="0" right-width="200rpx">
      <template v-slot:default>
        <view class="input-searcher">
          <UniIcons class="input-icon" type="search" size="22" color="#666" />
          <input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键字" />
        </view>
      </template>
    </UniNaveBar>
  </view>
</template>

<style lang="scss" scoped>
$nav-height: 30px;

.nav-bar {
  .input-searcher {
    display: flex;
    flex: 1;
    align-items: center;
    flex-wrap: nowrap;
    background-color: #f8f8f8;
    padding: 0 5px;
    margin: 5px 0;
    border-radius: 15px;
    overflow: hidden;

    .input-icon {
      line-height: $nav-height;
    }

    .nav-bar-input {
      flex: 1;
      height: $nav-height;
      line-height: $nav-height;
      padding: 0 5px;
      font-size: 12px;
      background-color: #f8f8f8;
    }
  }
}
</style>
